<?$this->load->view('admin/tools/admin-header')?>
<?$this->load->view('admin/tools/admin-menu')?>
<?=$xinha_inclusion?>

<div class="wrap">
	<a><div id="icon-index" class="icon32"><br /></div></a><br>
<h3><a>Tulis -> Listing -> step2 </a></h3>
<?if(!(empty($mode))){echo"<div id='message' class='updated fade'><p>$pesan</p></div>";}?>
<div id="dashboard-widgets-wrap">
<form action="<?=site_url('administrator/update_listing')?>" method='POST' enctype="multipart/form-data">
<table width="90%" border="0">
<tr valign="top">
<td width="60%">

<?foreach ($query as $row){
			$kode_listing	= $row->kode_listing;
			$nip_marketing	= $row->nip_marketing;
			$tipe_property	= $row->tipe_property;
			$tipe_listing	= $row->tipe_listing;
			$harga			= $row->harga;
			$lokasi			= $row->lokasi;
			$deskripsi		= $row->deskripsi;
			$note			= $row->note;
			$detail			= stripslashes($row->detail);
			$tanggal		= $row->tanggal;
			$status			= $row->status_listing;
	}
?>

<div style="float:left">
<h3><label for="title">Kode</label></h3>
<input type="text" size="20" value="<?=$kode_listing?>" disabled=disabled>&nbsp;&nbsp;
<input type="hidden" name="listing_kode" size="20" value="<?=$kode_listing?>">
</div>
	
<div style="float:left">
<h3><label for="title">Tipe Listing</label></h3>
<select name='listing_tipe_listing' tabindex='6' id='post_status' style="font-size:14px;width:100px">
<option <?if($tipe_listing=='jual'){echo "selected='selected'";}?> value='jual'>Jual</option>
<option <?if($tipe_listing=='sewa'){echo "selected='selected'";}?> value='sewa'>Sewa</option>
</select>&nbsp;&nbsp;
</div>

<div style="float:left">
<h3><label for="title">Tipe Property</label></h3>
<select name='listing_tipe_property' tabindex='6' id='post_status' style="font-size:14px;width:140px">
<option <?if($tipe_property=='rumah_tinggal'){echo "selected='selected'";}?> value='rumah_tinggal'>Rumah Tinggal</option>
<option <?if($tipe_property=='gudang'){echo "selected='selected'";}?> value='gudang'>Gudang</option>
<option <?if($tipe_property=='ruko'){echo "selected='selected'";}?> value='ruko'>Ruko</option>
<option <?if($tipe_property=='ruang_usaha'){echo "selected='selected'";}?> value='ruang_usaha'>Ruang Usaha</option>
<option <?if($tipe_property=='kos-kosan'){echo "selected='selected'";}?> value='kos-kosan'>Kos-kosan</option>
<option <?if($tipe_property=='tanah_kavling'){echo "selected='selected'";}?> value='tanah_kavling'>Tanah Kavling</option>
<option <?if($tipe_property=='villa'){echo "selected='selected'";}?> value='villa'>Villa</option>
<option <?if($tipe_property=='perkantoran'){echo "selected='selected'";}?> value='perkantoran'>Perkantoran</option>
<option <?if($tipe_property=='apartemen'){echo "selected='selected'";}?> value='apartemen'>Apartemen</option>
<option <?if($tipe_property=='kios'){echo "selected='selected'";}?> value='kios'>Kios</option>
</select>
</div>

<div class="clear"></div>
<div style="float:left">
<h3><label for="title">Harga</label></h3>
<input type="text" name="listing_harga" size="30" Value="<?=$harga?>">&nbsp;&nbsp;
</div>
	
<div style="float:left">
<h3><label for="title">Status Listing</label></h3>
<select name='listing_status_listing' tabindex='6' id='post_status' style="font-size:14px;width:120px">
<option <?if($status=='tersedia'){echo "selected='selected'";}?> value='tersedia'>Tersedia</option>
<option <?if($status=='laku'){echo "selected='selected'";}?> value='laku'>Sudah laku</option>
</select>&nbsp;&nbsp;
</div>
<div class="clear"></div>	
<div>
<h3><label for="title">Lokasi</label></h3>
<input type="text" name="listing_lokasi" size="30" Value="<?=$lokasi?>">&nbsp;&nbsp;
</div>

<div class="clear"></div>
<div style="float:left">
<h3><label for="title">Deskripsi</label></h3>
<textarea id="teks" cols="60" rows="2" name="listing_deskripsi" title="Summary dari Listing Contohnya 'DIJUAL : Kos-Kosan 2.5 Lantai, 17 Kamar Tidur di Kemanggisan'"><?=$deskripsi?></textarea>
</div>
	
<div class="clear"></div>
<div style="float:left">
<h3><label for="title">Note</label></h3>
<textarea id="teks" cols="60" rows="2" name="listing_note"><?=$note?></textarea>
</div>

<div style="float:left">
<h3><label for="title">Isi Detail Listing</label></h3>
<textarea id="teks" cols="84" rows="25" name="listing_detail"><?=$detail;?></textarea>
</div>
<td  style="float:right;background-color:#464646;" width="350px;">
<div class="submitbox" id="submitpage">

<div class="submit">
<strong><label for='post_status'>Marketing</label></strong><br>
<select name='listing_marketing' tabindex='6' id='post_status' style="width:90%;font-size:14px;">
<option selected="selected" value=''>--Pilih Marketing--</option>
<?
foreach($queryMarketing as $row){
	if($row->nip==$nip_marketing){
		$selected="selected='selected'";
	}else{$selected="";}
echo "<option  value='".$row->nip."' $selected >".ucwords($row->nama)."</option>";
}
?>
<br><br>
<strong><label for='post_status'>Tanggal</label></strong><br>
<input type="text" name="listing_tanggal" size="12" id="DateAgenda" value="<?=$tanggal?>" readonly><input type="button" onClick="SelectDate('Date1')" value="Set"><br><br>

<input type='submit' class="button-primary"  name='submit' value='Update'>
</div>
</div>
</td>
</tr>

<tr>
<td>

</td>
</td>
<td></td>
</tr>
</table>
</form>
</div>
</div><!-- wrap -->
<div class="clear"></div></div><!-- wpbody-content -->
<div class="clear"></div></div><!-- wpbody -->
<div class="clear"></div></div><!-- wpcontent -->
</div><!-- wpwrap -->

<!--admin-footer-->
<?$this->load->view('admin/tools/admin-footer');?>
<!--admin-footer-->
